In graphics-related application programming interfaces (APIs), applications may provide small programs called shaders that perform operations such as inner-loop computations on graphics-specific hardware, such as graphics processing units (GPUs). As shader instruction sets may vary significantly between GPUs, the shader source code may be provided to the driver at runtime. The driver may then compile source code instructions into a hardware-specific executable. Depending on the hardware architecture, the hardware executable also may depend the graphics API state, so the driver may create multiple executables for the shader on-demand as the shader is used with different state combinations.